1. Technical Field
The present invention relates to computer networks, and more particularly to systems and methods for assigning port addresses based on link rates.
2. Description of Related Art
Network devices are commonly used in computer networks for sending and receiving information. Examples of a network device, without limitation, include a switch, router, a host bus adapter (HBA), a host channel adapter (HCA), a network interface card, and others. Network devices typically include ports for receiving and transmitting information. Network ports may be coupled to links that operate at different speeds, for example, 1 gigabyte per second (“GB”), 2 GB, 4 GB, 8 GB and others. Network congestion may occur when a port coupled to a link that operates at a higher rate communicates with a network device coupled to a link that operates at a lower rate.
Network devices may use virtual lanes (VLs) to reduce network congestion. Each VL may have independent flow control. In conventional systems. VL assignment is not based on a link's ability to transmit and receive information. In some type of networks (for example, Fibre Channel based networks), the VLs are assigned based on a port's address. However, the port address assignment is not based on link rate and congestion can still occur within a given VL if the link rates are mixed at an Inter-Switch Link (ISL).
FIG. 1 illustrates this problem. The illustrated SAN 20 includes a first switch 22 and a second switch 24. A plurality of host bus adapters (HBAs) 26 are connected to ports 28 of the first switch 22 via links 21, 23 and 25, respectively. The links 21, 23 and 25 may operate at different rates. For example, link 21 may operate at 2 GB, link 25 may operate at 4 Gb and link 23 may operate at 8 GB.
A plurality of storage devices (also referred to as “target”) 30 is connected to ports 28 of the second switch 24 via links 27, 29 and 31, respectively. The links 27, 29 and 31 connecting the storage devices 30 to switch 24 may operate at different speeds. For example, links 27 and 29 may operate at 2 Gb and link 31 may operate at 4 GB.
Switches 22 and 24 are operationally coupled via an Inter Switch Link (ISL) 34. The ISL 34 is shown as four lines for illustration purposes only and may be a single or multiple physical links using four independent buffer-to-buffer flow controls (i.e. virtual lanes). A plurality of VLs (for example, VL0, VL1. VL2 and VL3) 32 may be used for communication between switches 22 and 24. VLs 32 are assigned such that HBAs 26 and target 30 can communicate with each other. The VL 32 assignment is based on port address and port address assignment itself is not based on link rate. For example, a first virtual lane (VL0) may be assigned for communication between links 21 (2 GB) and 31 (4 GB); VL1 may be assigned to support communication between links 25 (4 GB) and 27 (2 GB). In conventional systems, there is no correlation between the VL assignment and a link's ability to transmit and receive information. Therefore, conventional systems are susceptible to congestion, there is a need for a method, and system for assigning port addresses such that lanes are assigned based on link rates.